Communication method and apparatus

ABSTRACT

A communication method and an apparatus are provided. The method includes: A common application programming interface framework core function (CCF) network element first sends reference information of an application to a first network element. Therefore, the first network element determines network slice information corresponding to the application; and then the first network element sends the determined network slice information to the CCF network element. In this way, the CCF network element may determine the network slice information corresponding to the application, so that when an API invoker network element searches for an API, the CCF network element can accurately find, based on an API inquiry parameter, the API from a network slice corresponding to the network slice information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2019/093866, filed on Jun. 28, 2019, which claims priority toChinese Patent Application No. 201810703100.9, filed on Jun. 30, 2018.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of this application relate to the field of communicationstechnologies, and in particular, to a communication method and anapparatus.

BACKGROUND

A traditional cellular network architecture can provide onlycommunications services of a same type for different terminal types andservice types, and this is difficult to meet differentiatedcommunication requirements brought by digital transformation. To providea differentiated communications service, in a fifth generation (5G)mobile communications system, a network is abstracted as a plurality ofnetwork slices (NS), one network slice can meet a type of communicationsservice requirement, and the 5G mobile communications system may includea large quantity of network slices that meet different communicationsservices.

A northbound API opened by a common application interface framework(common API framework, CAPIF) to an API invoker network element maycorrespond to one or more southbound APIs, and the southbound APIs areusually provided by network elements that are in a same network slice.Usually, an application service provider or an application signs acontract with a mobile communications network operator for leasing oneor more network slices. Information about the signed contract includes acorrespondence between the application service provider or theapplication and network slice information. The contract information maybe stored in a policy control function (PCF) or a unified datarepository (UDR).

Currently, in the CAPIF, because the API invoker network element doesnot determine the network slice information corresponding to theapplication, an API found by the API invoker network element may not beprovided by a network slice corresponding to the application, and aproblem that an API search result may be incorrect exists.

SUMMARY

In view of this, this application provides a communication method and anapparatus, to determine a network slice corresponding to an application,so that an API invoker network element can accurately search the networkslice corresponding to the application for an API.

According to a first aspect, an embodiment of this application providesa communication method. The method includes: A CCF network element firstsends reference information of an application to a first networkelement. The reference information of the application includes at leastone of an API invoker network element identifier, an ASP identifier, anapplication identifier, and an access point name APN. Therefore, thefirst network element determines, based on the reference information ofthe application, network slice information corresponding to theapplication, and then sends the network slice information to the CCFnetwork element.

In the method, the first network element may be an AEF network element,an APF network element, or a PCF network element. According to themethod, the CCF network element can obtain the network slice informationfrom the first network element based on the reference information of theapplication, and subsequently, the CCF network element can accuratelysearch a network slice corresponding to the network slice informationfor an API.

In a possible implementation, the CCF network element first receives anAPI publish request message from an API publishing network element. TheAPI publish request message includes a correspondence between thenetwork slice and API information. The CCF network element locallystores the correspondence. In this way, when subsequently receiving anAPI discover request message that is from the API invoker networkelement, the CCF network element determines, based on the network sliceinformation, the API information corresponding to the network sliceinformation.

In a possible implementation, the CCF network element receives an APIdiscover request message from the API invoker network element. Becausethe API discover request message includes an API inquiry parameter andthe reference information of the application, and the API inquiryparameter includes at least one of an API type, a transfer protocoltype, and interface information, the CCF network element determines,based on the correspondence between the network slice information andthe API, the network slice information, and the API inquiry parameter,target API information corresponding to the application. An APIcorresponding to the target API information is invoked by the APIinvoker network element. According to the method, when the API invokernetwork element searches for the API, the CCF network element accuratelysearches for, based on the network slice information, the locally storedcorrespondence between the network slice information and the API, andthe API inquiry parameter, the API from the network slice correspondingto the network slice information.

In a possible implementation, after determining the target APIinformation, the CCF network element sends the network slice informationand the target API information to the API invoker network element. Inthis way, the API invoker network element may subsequently invoke anetwork element that is in the network slice based on the network sliceinformation and the target API information, to obtain a network functionservice.

In a possible implementation, when the CCF network element does notstore the network slice information corresponding to the referenceinformation of the application, the CCF network element may send thereference information of the application to the first network element;otherwise, the CCF network element directly searches locally for thenetwork slice information corresponding to the reference information ofthe application. If the CCF network element directly searches locallyfor the network slice information corresponding to the referenceinformation of the application, the network slice information can befound in a timely manner, and a communication interaction latency can bereduced to some extent.

According to a second aspect, an embodiment of this application providesanother communication method. The method includes: An AEF networkelement sends reference information of an application to a policycontrol function PCF network element. The reference information of theapplication includes at least one of an API invoker network elementidentifier, an ASP identifier, an application identifier, and an APN.Therefore, the PCF network element determines, based on the referenceinformation of the application, network slice information correspondingto the reference information of the application, and then sends thenetwork slice information to the AEF network element. According to themethod, the AEF network element may obtain the network slice informationfrom the PCF network element based on the reference information of theapplication.

In a possible implementation, the AEF network element receives a firstinvoking request message from an API invoker network element. The firstinvoking request message includes the reference information of theapplication and target API information requested to be invoked. Afterreceiving the network slice information, the AEF network element sends anetwork function discovery request message to an NRF network element.Because the network function discovery request message includes thenetwork slice information, the NRF network element may determine, basedon the target API information requested to be invoked and the networkslice information that are in the first invoking request message, targetnetwork element information corresponding to the target API information,and then send a network function discovery response message to the AEFnetwork element. The network function discovery response messageincludes target network element information corresponding to the networkslice information and the target API information requested to beinvoked. According to the method, the AEF network element uses thenetwork slice information obtained from the PCF network element, toaccurately search for, on a network slice corresponding to the networkslice information, the target network element information correspondingto the target API information.

In a possible implementation, after receiving the network functiondiscovery response message from the NRF network element, the AEF networkelement sends, based on the first invoking request message, a secondinvoking request message to a target network element corresponding tothe target network element information. The second invoking requestmessage also includes the API information. After receiving the secondinvoking request message, the target network element invokes an APIcorresponding to the API information, and generates an invoking result.The AEF network element receives the invoking result of the API from thetarget network element, and then sends the invoking result to the APIinvoker network element. In this way, the target network element mayinvoke the API and generate the invoking result, and the AEF networkelement obtains the invoking result from the target network elementthrough the NRF network element, so as to invoke the API correspondingto the target API information.

In a possible implementation, when the AEF network element does notstore the network slice information corresponding to the referenceinformation of the application, the AEF network element sends thereference information of the application to the PCF network element;otherwise, the AEF network element directly finds the network sliceinformation from the AEF network element. If the AEF network elementdirectly searches locally for the network slice informationcorresponding to the reference information of the application, thenetwork slice information can be found in a timely manner, and acommunication interaction latency can be reduced to some extent.

According to a third aspect, this application further provides acommunication method, and the method may be performed by a first networkelement. The method includes: The first network element receivesreference information of an application from a CCF network element.Therefore, the first network element sends, based on the referenceinformation of the application, network slice information correspondingto the application to the CCF network element.

In other words, the first network element determines, based on thereference information of the application, the network slice informationcorresponding to the application, and then sends the network sliceinformation to the CCF network element. The first network element may bean AEF network element, an APF network element, or a PCF networkelement. The reference information of the application includes at leastone of an API invoker network element identifier, an ASP identifier, anapplication identifier, and an access point name APN.

According to the method, the CCF network element can obtain the networkslice information from the first network element based on the referenceinformation of the application, and subsequently, the CCF networkelement can accurately search a network slice corresponding to thenetwork slice information for an API.

According to a fourth aspect, this application further provides acommunication method, and the method may be performed by a PCF networkelement. The method includes: The PCF network element receives referenceinformation of an application from an AEF network element. The PCFnetwork element sends, based on the reference information of theapplication, network slice information corresponding to the applicationto the AEF network element.

The reference information of the application includes at least one of anAPI invoker network element identifier, an ASP identifier, anapplication identifier, and an APN. According to the method, the PCFnetwork element may determine the network slice information based on thereference information that is of the application and that is obtainedfrom the AEF network element. In this way, the AEF network element mayfind target network element information based on the network sliceinformation returned by the PCF network element and target APIinformation requested to be invoked, so that the API invoker networkelement receives execution results of the AEF network element and atarget network element from the AEF network element.

According to a fifth aspect, this application further provides acommunication method, and the method may be performed by an AEF networkelement. The method includes: The AEF network element receives a firstinvoking request message from an API invoker network element. The firstinvoking request message includes reference information of anapplication. Therefore, the AEF network element determines, based on thefirst invoking request message, network slice information correspondingto the reference information of the application. The referenceinformation of the application may include at least one of an APIinvoker network element identifier, an ASP identifier, an applicationidentifier, and an APN. According to the method, the AEF network elementmay accurately search a network slice corresponding to the network sliceinformation for an API. In addition, directly searching locally for thenetwork slice information corresponding to the reference information ofthe application helps find the network slice information in a timelymanner, and can reduce a communication interaction latency to someextent.

In a possible implementation, the first invoking request message furtherincludes target API information requested to be invoked. The AEF networkelement sends a network function discovery request message to an NRFnetwork element. Because the network function discovery request messageincludes the network slice information, the NRF network element maydetermine, based on the network slice information and the target APIinformation requested to be invoked, target network element informationcorresponding to the network slice information and the target APIinformation, and then send a network function discovery response messageto the AEF network element. The network function discovery responsemessage includes the target network element information corresponding tothe network slice information and the target API information requestedto be invoked.

According to the method, the AEF network element may obtain the networkslice information from the PCF network element based on the referenceinformation of the application, and then may find the target networkelement information based on the network slice information and thetarget API information requested to be invoked.

In a possible implementation, after receiving the network functiondiscovery response message from the NRF network element, the AEF networkelement sends, based on the first invoking request message, a secondinvoking request message to a target network element corresponding tothe target network element information. The second invoking requestmessage also includes the API information. After receiving the secondinvoking request message, the target network element invokes an APIcorresponding to the API information, and generates an invoking result.The AEF network element receives the invoking result of the API from thetarget network element, and then sends the invoking result to the APIinvoker network element.

In this way, the target network element may invoke the API and generatethe invoking result, and the AEF network element obtains the invokingresult from the target network element through the NRF network element,so as to invoke the API corresponding to the target API information.

According to a sixth aspect, this application further provides acommunication method, and the method may be performed by an AEF networkelement. The method includes: The AEF network element receivesinformation about a target area of an application service and networkfunction service information from an API invoker network element, andthen the AEF network element determines, based on the information aboutthe target area of the application service and information about aservice area of a network element corresponding to the network functionservice information, a target network element that provides, for the APIinvoker network element, a network function service corresponding to thenetwork function service information.

According to the method, the AEF network element can accurately find thetarget network element based on the service area of the applicationservice of the API invoker network element and the information about theservice area of the network element corresponding to the networkfunction service information, so that the target network element invokesan API and generates an invoking result, and provides the networkfunction service for the API invoker network element.

In a possible implementation, the AEF network element determines, basedon the network function service information, the network elementcorresponding to the network function service information.

Further, in a possible implementation, the AEF network element maydetermine, from the network element corresponding to the networkfunction service information, a network element whose service area atleast partially overlaps the target area of the application service, anddetermine the network element as the target network element.

In addition, the AEF network element may alternatively determine anetwork element that is in the network element corresponding to thenetwork function service information and whose service area completelyoverlaps the target area of the application service as the targetnetwork element. According to the method, the target network elementdetermined by the AEF network element may accurately provide, for theAPI invoker network element, the network function service correspondingto the application service.

In a possible implementation, the AEF network element may further firstobtain the network slice information corresponding to the applicationservice, and then determine the target network element based on thenetwork slice information, the information about the service area of thenetwork element corresponding to the network function serviceinformation, and the information about the target area of theapplication service. According to the method, the target network elementdetermined by the AEF network element may accurately provide, for theAPI invoker network element, the network function service correspondingto the application service.

According to a seventh aspect, this application further provides acommunication method, and the method may be performed by an NRF networkelement. The method includes: The NRF network element receives, from anAEF network element, information about a target area of an applicationservice and network function service information corresponding to theapplication service, and then the NRF network element determines atarget network element based on the information about the target area ofthe application service and information about a service area of anetwork element corresponding to the network function serviceinformation.

According to the method, the target network element determined by theNRF network element may accurately provide, for an API invoker networkelement, a network function service corresponding to the applicationservice.

In a possible design, the NRF network element determines, based on thenetwork function service information corresponding to the applicationservice, the network element corresponding to the network functionservice information.

Further, in a possible implementation, the NRF network element maydetermine, from the network element corresponding to the networkfunction service information, a network element whose service area atleast partially overlaps the target area of the application service asthe target network element. According to the method, the NRF networkelement may determine the target network element, to accurately providethe network function service for the API invoker network element.

According to an eighth aspect, this application provides an apparatus.The apparatus may be a CCF network element or a chip in an entity inwhich a CCF network element is located. The apparatus has a function ofimplementing embodiments of the first aspect. The function may beimplemented by hardware, or may be implemented by hardware by executingcorresponding software. The hardware or the software includes one ormore modules corresponding to the foregoing function.

In a possible design, when the apparatus is a CCF network element, theapparatus includes a processing unit and a communications unit. Theprocessing unit may be, for example, a processor, the communicationsunit may be, for example, a transceiver, and the transceiver includes aradio frequency circuit. Optionally, the CCF network element furtherincludes a storage unit, and the storage unit may be, for example, amemory. When the CCF network element includes a storage unit, thestorage unit stores a computer executable instruction, the processingunit is connected to the storage unit, and the processing unit executesthe computer executable instruction stored in the storage unit, so thatthe CCF network element performs the communication method according toany one of implementations of the first aspect.

In another possible design, when the apparatus is a chip in an entity inwhich a CCF network element is located, the chip includes a processingunit and a communications unit. The processing unit may be, for example,a processor, and the communications unit may be, for example, aninput/output interface, a pin, or a circuit. The processing unit mayexecute the computer executable instruction stored in the storage unit,so that the communication method according to any one of implementationsof the first aspect is performed. Optionally, the storage unit is astorage unit in the chip, for example, a register or a cache, or thestorage unit may alternatively be a storage unit that is in the targetservice entity and that is outside the chip, for example, a read-onlymemory (ROM), another type of static storage device that can storestatic information and an instruction, or a random access memory (RAM).

The processor mentioned in any of the foregoing designs may be ageneral-purpose central processing unit (CPU), a microprocessor, anapplication-specific integrated circuit (ASIC), or one or moreintegrated circuits for controlling program executions of thecommunication method according to the first aspect.

According to a ninth aspect, this application provides an apparatus. Theapparatus may be an AEF network element, or a chip in an entity in whichan AEF network element is located. The apparatus has a function ofimplementing embodiments of the second aspect, or a function ofimplementing embodiments of the fifth aspect, or a function ofimplementing embodiments of the sixth aspect. The function may beimplemented by hardware, or may be implemented by hardware by executingcorresponding software. The hardware or the software includes one ormore modules corresponding to the foregoing function.

In a possible design, when the apparatus is an AEF network element, theapparatus includes a processing unit and a communications unit. Theprocessing unit may be, for example, a processor, the communicationsunit may be, for example, a transceiver, and the transceiver includes aradio frequency circuit. Optionally, the AEF network element furtherincludes a storage unit, and the storage unit may be, for example, amemory. When the AEF network element includes a storage unit, thestorage unit stores a computer executable instruction, the processingunit is connected to the storage unit, and the processing unit executesthe computer executable instruction stored in the storage unit, so thatthe AEF network element performs the communication method according toany one of implementations of the second aspect or the function ofimplementing embodiments of the fifth aspect.

In another possible design, when the apparatus is a chip in an entity inwhich an AEF network element is located, the chip includes a processingunit and a communications unit. The processing unit may be, for example,a processor, and the communications unit may be, for example, aninput/output interface, a pin, or a circuit. The processing unit mayexecute the computer executable instruction stored in the storage unit,so that the communication method according to any one of implementationsof the first aspect is performed. Optionally, the storage unit is astorage unit in the chip, for example, a register or a cache, or thestorage unit may alternatively be a storage unit that is in the targetservice entity and that is outside the chip, for example, a read-onlymemory (ROM), another type of static storage device that can storestatic information and an instruction, or a random access memory (RAM).

The processor mentioned in any of the foregoing designs may be ageneral-purpose CPU, a microprocessor, an ASIC, or one or moreintegrated circuits for controlling program executions of thecommunication method according to the second aspect.

According to a tenth aspect, this application provides an apparatus. Theapparatus may be a first network element, or a chip in an entity inwhich the first network element is located. The first network elementmay be an AEF network element, an APF network element, or a PCF networkelement. The apparatus has a function of implementing embodiments of thethird aspect. The function may be implemented by hardware, or may beimplemented by hardware by executing corresponding software. Thehardware or the software includes one or more modules corresponding tothe foregoing function.

In a possible design, when the apparatus is an AEF network element, anAPF network element, or a PCF network element, the apparatus includes aprocessing unit and a communications unit. The processing unit may be,for example, a processor, the communications unit may be, for example, atransceiver, and the transceiver includes a radio frequency circuit.Optionally, the first network element further includes a storage unit,and the storage unit may be, for example, a memory. When the firstnetwork element includes a storage unit, the storage unit stores acomputer executable instruction, the processing unit is connected to thestorage unit, and the processing unit executes the computer executableinstruction stored in the storage unit, so that the first networkelement performs the communication method according to any one ofimplementations of the third aspect.

In another possible design, when the apparatus is a chip in an entity inwhich a first network element is located, the chip includes a processingunit and a communications unit. The processing unit may be, for example,a processor, and the communications unit may be, for example, aninput/output interface, a pin, or a circuit. The processing unit mayexecute the computer executable instruction stored in the storage unit,so that the communication method according to any one of implementationsof the first aspect is performed. Optionally, the storage unit is astorage unit in the chip, for example, a register or a cache, or thestorage unit may alternatively be a storage unit that is in the targetservice entity and that is outside the chip, for example, a read-onlymemory (ROM), another type of static storage device that can storestatic information and an instruction, or a random access memory (RAM).

The processor mentioned in any of the foregoing designs may be ageneral-purpose CPU, a microprocessor, an ASIC, or one or moreintegrated circuits for controlling program executions of thecommunication method according to the third aspect.

According to an eleventh aspect, this application provides an apparatus.The apparatus may be a PCF network element or a chip in an entity inwhich a PCF network element is located. The apparatus has a function ofimplementing embodiments of the fourth aspect. The function may beimplemented by hardware, or may be implemented by hardware by executingcorresponding software. The hardware or the software includes one ormore modules corresponding to the foregoing function.

In a possible design, when the apparatus is a PCF network element, theapparatus includes a processing unit and a communications unit. Theprocessing unit may be, for example, a processor, the communicationsunit may be, for example, a transceiver, and the transceiver includes aradio frequency circuit. Optionally, the PCF network element furtherincludes a storage unit, and the storage unit may be, for example, amemory. When the PCF network element includes a storage unit, thestorage unit stores a computer executable instruction, the processingunit is connected to the storage unit, and the processing unit executesthe computer executable instruction stored in the storage unit, so thatthe PCF network element performs the communication method according toany one of implementations of the fourth aspect.

In another possible design, when the apparatus is a chip in an entity inwhich a PCF network element is located, the chip includes a processingunit and a communications unit. The processing unit may be, for example,a processor, and the communications unit may be, for example, aninput/output interface, a pin, or a circuit. The processing unit mayexecute the computer executable instruction stored in the storage unit,so that the communication method according to any one of implementationsof the first aspect is performed. Optionally, the storage unit is astorage unit in the chip, for example, a register or a cache, or thestorage unit may alternatively be a storage unit that is in the targetservice entity and that is outside the chip, for example, a read-onlymemory (ROM), another type of static storage device that can storestatic information and an instruction, or a random access memory (RAM).

The processor mentioned in any of the foregoing designs may be ageneral-purpose CPU, a microprocessor, an ASIC, or one or moreintegrated circuits for controlling program executions of thecommunication method according to the fourth aspect.

According to a twelfth aspect, this application provides an apparatus.The apparatus may be an NRF network element or a chip in an entity inwhich an NRF network element is located. The apparatus has a function ofimplementing embodiments of the seventh aspect. The function may beimplemented by hardware, or may be implemented by hardware by executingcorresponding software. The hardware or the software includes one ormore modules corresponding to the foregoing function.

In a possible design, when the apparatus is an NRF network element, theapparatus includes a processing unit and a communications unit. Theprocessing unit may be, for example, a processor, the communicationsunit may be, for example, a transceiver, and the transceiver includes aradio frequency circuit. Optionally, the NRF network element furtherincludes a storage unit, and the storage unit may be, for example, amemory. When the NRF network element includes a storage unit, thestorage unit stores a computer executable instruction, the processingunit is connected to the storage unit, and the processing unit executesthe computer executable instruction stored in the storage unit, so thatthe NRF network element performs the communication method according toany one of implementations of the seventh aspect.

In another possible design, when the apparatus is a chip in an entity inwhich an NRF network element is located, the chip includes a processingunit and a communications unit. The processing unit may be, for example,a processor, and the communications unit may be, for example, aninput/output interface, a pin, or a circuit. The processing unit mayexecute the computer executable instruction stored in the storage unit,so that the communication method according to any one of implementationsof the first aspect is performed. Optionally, the storage unit is astorage unit in the chip, for example, a register or a cache, or thestorage unit may alternatively be a storage unit that is in the targetservice entity and that is outside the chip, for example, a read-onlymemory (ROM), another type of static storage device that can storestatic information and an instruction, or a random access memory (RAM).

The processor mentioned in any of the foregoing designs may be ageneral-purpose CPU, a microprocessor, an ASIC, or one or moreintegrated circuits for controlling program executions of thecommunication method according to the seventh aspect.

According to a thirteenth aspect, this application further provides acomputer-readable storage medium. The computer-readable storage mediumstores an instruction; and when the instruction is run on a computer,the computer is enabled to perform the method according to the foregoingaspects.

According to a fourteenth aspect, this application further provides acomputer program product including an instruction; and when the computerprogram product runs on a computer, the computer is enabled to performthe method in the foregoing aspects.

According to a fifteenth aspect, this application further provides acommunications system, where the system includes a CCF network elementand a first network element. The CCF network element is configured tosend reference information of an application to the first networkelement. The first network element is configured to send, based on thereference information of the application, network slice informationcorresponding to the application to the CCF network element. The CCFnetwork element is further configured to receive, from the first networkelement, the network slice information corresponding to the application.

In the system, the first network element may be an AEF network element,an APF network element, or a PCF network element. According to thesystem, the CCF network element can obtain the network slice informationfrom the first network element based on the reference information of theapplication, and subsequently, the CCF network element can accuratelysearch a network slice corresponding to the network slice informationfor an API.

According to a sixteenth aspect, this application further provides acommunications system, where the system includes an AEF network elementand a PCF network element. The AEF network element is configured to sendreference information of an application to the PCF network element. ThePCF network element is configured to send, based on the receivedreference information of the application, network slice informationcorresponding to the application to the AEF network element. The AEFnetwork element is further configured to receive, from the PCF networkelement, the network slice information corresponding to the application.

According to the system, the AEF network element may obtain the networkslice information from the PCF network element based on the referenceinformation of the application.

Such aspects or other aspects of this application are clearer and morecomprehensible in descriptions of the following embodiments.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an architectural diagram of a common API system according toan embodiment of this application;

FIG. 2 is a schematic diagram of a communication method according to anembodiment of this application;

FIG. 3A, FIG. 3B, FIG. 3C, and FIG. 3D are a schematic diagram of an APIdiscovery procedure and an API invoker procedure according to anembodiment of this application;

FIG. 4A and FIG. 4B are a schematic diagram of another API discoveryprocedure according to an embodiment of this application;

FIG. 5 is a schematic diagram of another communication method accordingto an embodiment of this application;

FIG. 6A and FIG. 6B are a schematic diagram of an API invoker procedureaccording to an embodiment of this application;

FIG. 7 is a schematic diagram of another API invoker procedure accordingto an embodiment of this application;

FIG. 8 a and FIG. 8 b are schematic diagrams of another communicationmethod according to an embodiment of this application;

FIG. 8 c is a schematic diagram of another communication methodaccording to an embodiment of this application;

FIG. 9 is a schematic diagram of an apparatus according to thisapplication;

FIG. 10 is a schematic diagram of still another apparatus according tothis application; and

FIG. 11 is a schematic diagram of another apparatus according to thisapplication.

DESCRIPTION OF EMBODIMENTS

The following further describes this application in detail withreference to the accompanying drawings.

Embodiments of this application may be applied to various mobilecommunications systems, for example, a new radio (NR) system, a globalsystem for mobile communications (GSM), a code division multiple access(CDMA) system, a wideband code division multiple access (WCDMA) system,a general packet radio service (GPRS) system, a long term evolution(long term LTE) system, an advanced long term evolution (LTE-A) system,a universal mobile telecommunications system (UMTS), an evolved longterm evolution (eLTE) system, and a fifth generation (5G) mobilecommunications system.

FIG. 1 is a schematic diagram of a possible applicable systemarchitecture according to this application. The schematic diagram is aframework diagram of a common application programming interface (API).The framework diagram includes an API invokerAPI invoker network element101 and a common application programming interface framework corefunction (CAPIF core function, CCF) network element 102, an applicationprogramming interface exposure function (API exposing function, AEF)network element 103, an application programming interface publishingfunction (API publishing function, APF) network element 104, and anapplication programming interface management function (API managementfunction, AMF) network element 105.

A CAPIF-1 is a reference point between an API invoker network elementand a CCF, and is used by an API invoker network element that is in aPLMN trusted domain to search for an API, authenticate with the CCF, andobtain authorization. The CAPIF-1 supports the following functions:authenticating the API invoker network element based on an identifierand a security credential of the API invoker network element; performingtwo-way authentication between the API invoker network element and theCCF; providing an API invoker entity with authorization for accessingthe API; discovering API information; and the like.

A CAPIF-1e is used by an API invoker network element that is outside thePLMN trusted domain to search for the API, authenticate with the CCF,and obtain authorization. The CAPIF-1e provides the same functions asthe CAPIF-1.

A CAPIF-2 is a reference point between the API invoker entity and an APIexposure function network element, and is used by the API invoker entitythat is in the PLMN trusted domain to perform API communication. TheCAPIF-2 supports the following functions: authenticating the API invokernetwork element based on the identifier and the security credential ofthe API invoker network element; performing authorization verificationwhen the API invoker network element accesses the API; invoking the API;and the like.

A CAPIF-2e is used by the API invoker entity that is in the PLMN trusteddomain to perform the API communication. The CAPIF-2e provides the samefunctions as the CAPIF-2.

A CAPIF-3 is a reference point between the API exposure function networkelement and the CCF, and is used to perform access-policy-relatedcontrol and the API communication initiated by the API invoker networkelement. The CAPIF-3 supports the following functions: supporting theAPI exposure function network element to authenticate the API invokernetwork element based on the identifier and the security credential ofthe API invoker network element; supporting the API exposure functionnetwork element to provide authorization for the API invoker networkelement before the API invoker network element accesses the API;supporting to perform authorization verification of the API exposurefunction network element when the API invoker network element accessesthe API; supporting the API exposure function network element to controlAPI access based on a policy configured by a PLMN operator; supportingthe API exposure function network element to record logs of the APIinvoker; supporting the API exposure function network element to chargefor the API invoker; and the like.

A CAPIF-4 is a reference point between an API publishing functionnetwork element and the CCF, and is used to publish the API information.The CAPIF-4 supports the following API publishing functions.

A CAPIF-5 is a reference point between an API management functionnetwork element and the CCF, and is used to manage the API and APIinvoker network element information. The CAPIF-5 supports the followingfunctions: supporting the API management function network element toaccess logs of the API invoker; supporting the API management functionnetwork element to monitor an API invoker event; supporting the APIinvoker network element to configure information about the API invokernetwork element on the CCF, to support registration of the API invokernetwork element; supporting the API management function network elementto configure the policy on the CCF, for example, configure an upperlimit of the API invoker and temporarily disable the API for a period oftime; supporting an API provider to monitor an API status; and the like.

The API invoker network element 101 is usually a third-party applicationfunction entity software program that signs a service agreement with thePLMN operator, and a third-party application may be, for example, amachine-to-machine (M2M) application, an internet-of-things (IoT)application, or a vehicle-to-everything (V2X) application. Suchapplications may run in a terminal device, or may run in a networkdevice. In addition, the API invoker network element may further be anapplication function (AF) network element. The API invoker networkelement and the API provider (for example, the PLMN operator) thatprovides the API may be in a same trusted domain, or may belong todifferent trusted domains. The API invoker network element 101 supportsthe following functions: supporting authentication of the API invokernetwork element, and authentication of the identifier and otherinformation of the API invoker network element; supporting mutualauthentication between the API invoker network element and the CAPIF;obtaining authorization before accessing the API; searching for andinvoking the API; and the like.

The CCF network element 102 supports the following functions:authenticating the API invoker network element based on the identifierand the other information of the API invoker network element; supportingmutual authentication between the CCF network element 102 and the APIinvoker network element; providing authorization for the API invokernetwork element before the API invoker network element accesses the API;publishing, storing, and searching for the API; controlling the APIaccess based on the policy of the PLMN operator; storing the logs of theAPI invoker and providing the logs for an authorized entity; performingcharging based on the API logs; checking the API invoker; registeringthe API invoker network element; storing the configuration policy;supporting audit of the invoking and the logs; and the like.

The AEF network element 103 provides the API, is also an entry for theAPI invoker network element 101 to invoke the API, and supports thefollowing functions: authenticating the API invoker network elementbased on the API invoker network element identifier and otherinformation provided by the CCF network element; acknowledging theauthorization provided by the CCF network element; and synchronizing theAPI logs to the CCF.

The APF network element 104 provides an API publishing function, so thatthe API invoker network element can discover the API.

The AMF network element 105 provides API management, and supports thefollowing functions: auditing the logs that are of the API invoker andthat are provided by the CCF network element; monitoring the eventreported by the CCF network element; configuring the policy of the APIprovider for the API; checking the API status; registering the APIinvoker network element; and the like.

In the LTE system, the AEF network element 103 may be deployed in aservice capability exposure function (SCEF) network element. The CCF 102may be deployed in an independent network entity. Alternatively, the CCF102 and an entity that is in an API service provider (for example, theAEF, the APF, or the AMF) may be deployed together in the SCEF.

In addition, in the 5G mobile communications system, the AEF networkelement 103 may be deployed in the network exposure function (NEF)network element. The CCF network element 102 may be deployed in anindependent network entity. Alternatively, the CCF 102 and the networkelement that is in the API service provider (for example, the AEF, theAPF, or the AMF) may be deployed together in the NEF.

Network elements in the embodiments of this application may beindependent physical devices, or may be logical function modules.Different logical function modules may be located on a same physicaldevice, or may be located on different physical devices. This is notlimited.

It should be noted that the network architecture and the applicationscenario described in this application are intended to describe thetechnical solutions in this application more clearly, but constitute nolimitation on the technical solutions provided in this application. Aperson of ordinary skill in the art may learn that the technicalsolutions provided in this application are also applicable to a similartechnical problem as the network architecture evolves and a new servicescenario emerges.

Currently, in the prior art, an API invoker network element cannotdetermine a network slice that provides an API searched by the APIinvoker network element, or a network slice that provides an API invokedby the API invoker network element. Therefore, a service provided by acorresponding network slice cannot be invoked. To resolve the foregoingproblem, the embodiments of this application provide a communicationmethod, so that in the system architecture shown in FIG. 1 , a CCFnetwork element can determine a network slice that provides an APIsearched by an API invoker network element, or an AEF network elementcan determine a network slice that provides an API invoked by an APIinvoker network element.

FIG. 2 is a schematic diagram of a communication method according tothis application. The method may be used by a CCF network element todetermine a network slice that provides an API searched for by an APIinvoker network element. The following describes the method.

Step 201: The CCF network element sends reference information of anapplication to a first network element.

The CCF network element may send the reference information of theapplication to the first network element by sending a message. Forexample, a first request message sent by the CCF to the first networkelement includes the reference information of the application. The firstrequest message may be a slice information discovery request (Slice infodiscover request) message or a slice information inquiry request (Sliceinfo inquiry request) message. The CCF network element may alternativelysend the reference information of the application to the first networkelement by invoking an API. For example, there is an API (in 5G, the APIis also referred to as a network function service (NF service)) betweenthe CCF network element and the first network element, and the CCFnetwork element invokes the API to transmit the parameter information,namely, the reference information of the application, to the firstnetwork element.

The reference information of the application is information related tothe application, and the first network element may determine, based onthe reference information of the application, network slice informationcorresponding to the application. The reference information of theapplication may include at least one of an API invoker network elementidentifier, an ASP identifier (ASP ID), an application identifier (APPID), an access point name (APN), and an application function identifier(AF ID). In other words, the reference information of the applicationmay include one or more of the API invoker network element identifier,the ASP identifier, the APP ID, the APN, and the AF ID.

For example, Tencent is an application service provider (ASP). WhenTencent signs a business agreement with a PLMN operator, the PLMNoperator allocates, to Tencent, an identifier (for example, asp.tencent)used to identify Tencent. The identifier may be identified by a networkelement in a PLMN domain, and an application identifier may be a QQapplication identifier, a WeChat application identifier, or the like.Alternatively, for example, the APN is a name of an access pointaccessed by the WeChat application. Usually, the APN accessed by theWeChat application is unique. Therefore, the WeChat application may bedetermined based on the APN.

The first network element may be an AEF network element, an APF networkelement, or a PCF network element.

Step 202: The first network element sends, based on the referenceinformation of the application, the network slice informationcorresponding to the application to the CCF network element.

In an implementation, the first network element stores a correspondencebetween the reference information of the application and the networkslice information. The correspondence may be configured by a networkmanagement system of an operator, or when an operator subscribes to athird-party application, the operator stores subscription informationthat includes the correspondence in the first network element.Therefore, the first network element may locally find, based on thereference information of the application, the network slice informationcorresponding to the application. The network slice information, forexample, a network slice identifier (Slice ID) such as S-NSSAI, may beused to identify a network slice.

For example, if the first network element stores a correspondencebetween the APP ID and the network slice identifier, and the firstrequest message carries the APP ID, the first network element maydetermine, based on the correspondence, a network slice identifiercorresponding to the APP ID carried in the first request message.

The network slice information corresponding to the application may beused to identify a network slice that provides a service for theapplication, and the network slice identifier may be a slice identifier(Slice ID) such as the single network slice selection assistanceinformation (S-NSSAI).

If the CCF network element sends, to the first network element, thefirst request message that includes the reference information of theapplication, the first network element may send, by using a message, thenetwork slice information corresponding to the application to the CCFnetwork element. For example, a first response message sent by the firstnetwork element to the CCF network element includes the network sliceinformation corresponding to the application. If the CCF network elementsends the reference information of the application to the first networkelement by invoking the API, the first network element may also feedback, to the first network element through the API, the parameterinformation, namely, the network slice information corresponding to theapplication. Alternatively, the network slice information correspondingto the application is returned in another callback communicationsinterface.

Step 203: The CCF network element receives, from the first networkelement, the network slice information corresponding to the application.

According to the foregoing steps, the CCF network element may obtain,from the first network element based on the reference information of theapplication, the network slice information corresponding to theapplication, and subsequently, the CCF network element can accuratelysearch a network slice corresponding to the network slice informationfor the API.

Optionally, in an implementation of the embodiment shown in FIG. 2 ,before step 201, the method further includes: The APF network elementsends an API publish request message to the CCF network element.

The API publish request message may include a correspondence between thenetwork slice information and API information. Specifically, thecorrespondence between the network slice information and the APIinformation may be established by using a pointer, a link, a table, orthe like. Usually, one network slice may correspond to a plurality ofAPIs, and one API uniquely corresponds to one network slice.

Further, the method may include: After receiving the API publish requestmessage, the CCF network element locally stores the correspondencebetween the network slice information and the API information. In thisway, when the API invoker network element requests to search for theAPI, the CCF network element can accurately find locally, based on thenetwork slice information, the API information that the API invokernetwork element requests to search for.

The API information is used to describe the API, and may include APIidentifier information, an API type, an API communication type, an APIdescription, interface information (such as an IP address, a portnumber, and a URI), a protocol type, an API version, an API data format,and the like.

The API type may be a charging related type, a quality of service (QoS)management related type, a location related type, or the like.

The protocol type may be the hypertext transfer protocol (HTTP), arepresentational state transfer (REST), a remote procedure call (RPC),or the like.

The interface information may be a conditional parameter such as the IPaddress, the port number, or the uniform resource identifier (URI).

In addition, the API identifier information is used to identify one API,and may be a name of the API, a number (for example, 001) of the API, arelative address of the API, or an absolute address of the API. This isnot limited.

The name of the API may be, for example, a Google Calendar API, orcalendar.googleapis.com.

Optionally, before step 201, the API invoker network element may firstsend an API discover request message to the CCF network element. The APIdiscover request message includes an API inquiry parameter and thereference information that is of the application. In other words, thereference information that is of the application and that is in thefirst request message sent by the CCF network element may be the APIdiscover request message sent by the API invoker network element.

The API inquiry parameter may include at least one of the API type, atransfer protocol type, and the interface information. For specificcontent of the API type, the transfer protocol type, and the interfaceinformation, refer to the foregoing descriptions. Details are notdescribed herein again.

The API discover request message may be used to search for the API.

Correspondingly, after the CCF network element receives the firstresponse message from the first network element, the method furtherincludes: The CCF network element determines target API informationbased on the correspondence between the network slice information andthe API information, the network slice information in the first responsemessage, and the API inquiry parameter.

Specifically, after receiving the first response message, the CCFnetwork element obtains, from the first response message, the networkslice information corresponding to the application, then finds, by usinga locally stored correspondence between the network slice informationand the target API, the API information corresponding to the networkslice information, and then selects, based on the API inquiry parameter,the target API information that meets the API inquiry parameter from theAPI information corresponding to the network slice information. Forexample, when the API inquiry parameter specifies that the API type ischarging and the transfer protocol is HTTP, the CCF selects, from theAPI information corresponding to the network slice information, the APIinformation whose API type is charging and whose transmission protocolis HTTP as the target API information.

For example, after receiving the first response message, the CCF networkelement may obtain the network slice identifier from the first responsemessage, and then determine, based on a correspondence between thenetwork slice identifier and the name of the API, that the network sliceidentifier corresponds to the Google Calendar API andcalendar.googleapis.com. The CCF network element then determines, basedon the API inquiry parameter, that the Google Calendar API is the targetAPI information.

Optionally, after step 203, the CCF network element may further send thenetwork slice information and the target API information to the APIinvoker network element. In this way, subsequently, the API invokernetwork element may request, from the AEF network element based on thenetwork slice information and the target API information, target networkelement information corresponding to the network slice information andthe target API information.

A target network element is a network element that provides a target APIand that is in the network slice corresponding to the application, forexample, a session management function (SMF) network element or anaccess and mobility management (Access and Mobility Management Function,AMF) network element.

The target network element information is used to identify the targetnetwork element, for example, an internet protocol address (IP) or auniform resource locator (URL) address of the target network element.

The target network element may provide the API for the API invokernetwork element, to invoke the API from the target network element afterthe API invoker network element obtains the network slice information.Alternatively, when the API invoker network element requests to invokethe target API corresponding to the target API information, the targetnetwork element may execute the target API. The executing the target APIrefers to running logical processing of the target API.

Optionally, in another implementation of the embodiment shown in FIG. 2, step 201 may be replaced with the following: When the CCF networkelement does not store network slice information corresponding toreference information of an application, the CCF network element maysend the reference information of the application to a first networkelement.

It should be noted that, if the CCF network element already buffers thecorrespondence between the reference information of the application andthe network slice information, the CCF network element may not send thereference information of the application to the first network element,but directly finds, based on the reference information of theapplication of the API invoker network element, the network sliceinformation from the information buffered by the CCF network elementAPIinvoker. Further, the CCF network element finds the target APIinformation based on the network slice information, the API inquiryparameter, and the correspondence between the network slice informationand the API information, and sends the target API information to the APIinvoker network element. It can be learned that the CCF network elementdirectly searches locally for the network slice informationcorresponding to the reference information of the application, so thatthe network slice information can be found in a timely manner, therebyreducing a communication interaction latency and signaling load.

In a possible implementation, the CCF network element may furtheractively subscribe to, from the first network element, the network sliceinformation corresponding to the reference information of theapplication. In this way, when the network slice informationcorresponding to the reference information of the application in thefirst network element changes, the first network element sends anotification message to the CCF network element. The notificationmessage carries latest network slice information corresponding to thereference information of the application. Alternatively, in anotherpossible implementation, the CCF network element may periodically send arequest to the first network element or the CCF network element may senda request to the first network element based on an event, to requestlatest network slice information corresponding to the referenceinformation of the application.

The following describes a specific implementation process of theforegoing communication method with reference to FIG. 3A, FIG. 3B, FIG.3C, and FIG. 3D. Network elements in FIG. 3A, FIG. 3B, FIG. 3C, and FIG.3D interact with each other by using a message.

Step 301 a: The APF network element sends an API publish request messageto the CCF network element.

The API publish request message may include a correspondence between APIinformation and network slice information.

Usually, a network element in a network slice may provide a plurality ofdifferent APIs, and such APIs can implement different network functionNF service), for example, PDU session services. The different networkslices may provide an API of a same network function service.

The network function service is a function exposed by a network functionentity through an API, and may be used by another network functionentity. The network function entity may be the network element mentionedin this application, for example, the API invoker network element, theCCF network element, or the PCF network element.

Step 301 b: After receiving the API publish request message, the CCFnetwork element locally stores the correspondence between the APIinformation and the network slice information.

Step 302: The API invoker network element sends an API discover requestmessage to the CCF network element.

The API discover request message includes reference information of anapplication and an API inquiry parameter. For the reference informationof the application and the API inquiry parameter, refer to the foregoingrelated descriptions. Details are not described again.

Step 303 a: The CCF network element sends a first request message to thefirst network element.

The first request message includes the reference information of theapplication.

The first network element may be the AEF network element, the APFnetwork element, or the PCF network element.

Step 303 b: The first network element determines, based on the referenceinformation of the application, network slice information correspondingto the application.

The network slice information may be a network slice identifier such asS-NSSAI.

In an example, the first network element may store a correspondencebetween the reference information of the application and the networkslice information, and the first network element may find, based on thecorrespondence, the network slice information corresponding to theapplication.

In another example, a UDR stores a correspondence between the referenceinformation of the application and the network slice information. Thefirst network element may send the reference information of theapplication to the UDR, and the UDR determines, based on thecorrespondence, the network slice information corresponding to theapplication, and sends the determined network slice information to thefirst network element.

Step 303 c: The first network element sends a first response message tothe CCF network element.

The first response message includes the network slice informationcorresponding to the application.

For example, if the network slice information that corresponds to theapplication and that is determined in step 303 b includes informationabout a plurality of network slices, the first network element may sendthe information about the plurality of network slices to the CCF networkelement in a list form.

Step 304: The CCF network element determines target API informationbased on the API inquiry parameter, the network slice information in thefirst response message, and the correspondence between the APIinformation and the network slice information.

For example, the CCF network element may first determine, based on thecorrespondence between the network slice information and the APIinformation, an API provided by a network slice corresponding to thenetwork slice information, and then determine, based on the API inquiryparameter, the target API information that meets an API inquirycondition.

Step 305: The CCF network element sends a discover request responsemessage to the API invoker network element.

The discover request response message includes the target APIinformation.

Further, the discover request response message may include the networkslice information, or a correspondence between the target APIinformation and the network slice information. In this way, afterreceiving the discover request response message, the API invoker networkelement may invoke a target API of the network slice corresponding tothe network slice information.

Through step 301 to step 305, the CCF network element can obtain, fromthe first network element, the network slice information correspondingto the application, and then can accurately find, from the network slicecorresponding to the network slice information, the API information thatmeets the API inquiry parameter.

In a possible implementation, step 303 a may be replaced with thefollowing: If the CCF network element does not store a correspondencebetween the network slice information and the reference information ofthe application, the CCF network element may send a first requestmessage to the first network element.

In another possible implementation, if the CCF network element storesthe correspondence between the network slice information and thereference information of the application, steps 303 a to 303 c may bereplaced with the following: The CCF network element determines, basedon the correspondence, network slice information corresponding to theapplication.

According to the method provided in the foregoing embodiment, the CCFnetwork element can obtain the network slice information from the firstnetwork element based on the reference information of the application,and subsequently, the CCF network element can accurately search thenetwork slice corresponding to the network slice information for an API.

Optionally, in a possible implementation of the embodiment shown in FIG.3A, FIG. 3B, FIG. 3C, and FIG. 3D, after steps 301 to 305, the methodfurther includes steps 306 to 309.

After steps 301 to 305 are performed, the API invoker network elementobtains, from the CCF network element, the target API information andthe network slice information that provides the target API.Subsequently, the API invoker network element may initiate an APIinvoker process to the AEF network element. The process is shown in FIG.3A, FIG. 3B, FIG. 3C, and FIG. 3D, and is specifically as follows.

Step 306: The API invoker network element sends an API invoker requestmessage to the AEF network element.

The API invoker request message may include the target API information,the network slice information, or the correspondence between the targetAPI information and the network slice information. The target APIinformation, the network slice information, or the correspondencebetween the target API information and the network slice information isobtained by the API invoker network element from the discover requestresponse message.

Step 307 a: The AEF network element sends a network function discoveryrequest message to an NRF network element.

The network function discovery request message includes the target APIinformation and the network slice information corresponding to theapplication.

It should be noted that, when the first network element is the AEFnetwork element, the AEF network element in step 306 to step 308 may bethe first network element.

Step 307 b: The NRF network element determines target network elementinformation based on the target API information and the network sliceinformation corresponding to the application.

For specific content of a target network element and the target networkelement information, refer to the foregoing descriptions.

Because the target network element registers the API information and thenetwork slice information corresponding to the target network elementwith the NRF network element in advance, the NRF network element storesa correspondence between the target network element information and thenetwork slice information and the API information. Therefore, the NRFnetwork element can determine the target network element informationbased on the network slice information and the target API information.

Step 307 c: The NRF network element sends a network function discoveryresponse message to the API invoker network element.

The network function discovery response message includes the targetnetwork element information.

Step 308 a: The AEF network element sends a second invoking requestmessage to the target network element based on the target networkelement information.

The second invoking request message includes the target API information.

Step 308 b: The target network element executes the target APIcorresponding to the target API information, and generates an invokingresult.

Step 308 c: The target network element sends the generated invokingresult to the AEF network element.

Step 309: The AEF network element sends the API invoker result to theAPI invoker network element.

For example, the invoking result is information indicating a success orinformation indicating a failure. If the invoking result is informationindicating a failure, the invoking result may further include a causevalue of the failure.

In this way, through step 306 to step 309, when the API invoker networkelement initiates API invoker, the AEF network element can find, fromthe network slice, the target network element corresponding to thetarget API information, and the AEF network element obtains the APIinvoker result through the target network element, so that the APIinvoker result is fed back to the API invoker network element, therebyachieving an objective of invoking the API.

Optionally, in another implementation of the embodiment shown in FIG. 2, after step 202, if the first network element is the AEF networkelement or the APF network element, when the AEF network element or theAPF network element does not store the correspondence between thenetwork slice information and the reference information of theapplication, the network slice information corresponding to theapplication may be determined through the PCF network element. Thefollowing describes a specific implementation process of the foregoingcommunication method with reference to FIG. 4A and FIG. 4B. Networkelements in FIG. 4A and FIG. 4B interact with each other by using amessage.

Step 401: An APF network element sends an API publish request message toa CCF network element.

The API publish request message may include a correspondence between APIinformation and network slice information. For the correspondencebetween the network slice information and the API information, refer tothe foregoing descriptions. Details are not described herein again.

Step 402: An API invoker network element sends an API discover requestmessage to the CCF network element.

The API discover request message includes reference information of anapplication and an API inquiry parameter. For the reference informationof the application and the API inquiry parameter, refer to the foregoingrelated descriptions. Details are not described again.

Step 403 a: The CCF network element sends a first request message to anAEF network element or an APF network element.

The first request message includes the reference information of theapplication.

Step 403 b: The AEF network element or the APF network elementdetermines, based on the reference information of the application, thenetwork slice information corresponding to the application.

The network slice information may be a network slice identifier such asS-NSSAI.

Step 404 a: The AEF network element or the APF network element does notlocally store the correspondence between the network slice informationand the API information. Therefore, the AEF network element or the APFnetwork element sends a network slice search request message to a PCFnetwork element, and the message includes the reference information ofthe application.

Step 404 b: The PCF network element determines, based on the referenceinformation of the application, the network slice informationcorresponding to the application. For example, the network sliceinformation may be the network slice identifier such as the S-NSSAI.

Because the PCF network element already stores the correspondencebetween the reference information of the application and the networkslice information, and the correspondence may be configured by a networkmanagement system of an operator, or may be stored in the PCF networkelement by an operator when the operator subscribes to a third-partyapplication, the PCF network element may locally find, based on thereference information of the application, the network slice informationcorresponding to the application.

Step 404 c: The PCF network element sends a network slice searchresponse message to the AEF network element or the APF network element,where the message includes the network slice information correspondingto the application.

S403 c: The AEF network element or the APF network element sends a firstresponse message to the CCF network element.

The first response message includes the network slice informationcorresponding to the application.

For example, if the network slice information that corresponds to theapplication and that is determined in step 403 c includes informationabout a plurality of network slices, the AEF network element or the APFnetwork element may send the information about the plurality of networkslices to the CCF network element in a list form.

Step 405: The CCF network element determines target API informationbased on the API inquiry parameter, the network slice information in thefirst response message, and the correspondence between the APIinformation and the network slice information.

For example, the CCF network element may first determine, based on thecorrespondence between the network slice information and the APIinformation, an API provided by a network slice corresponding to thenetwork slice information, and then determine, based on the API inquiryparameter, the target API information that meets an API inquirycondition.

Step 406: The CCF network element returns a search request responsemessage to the API invoker network element.

The discover request response message includes the target APIinformation.

Further, the discover request response message may include the networkslice information, or the correspondence between the target APIinformation and the network slice information. In this way, afterreceiving the discover request response message, the API invoker networkelement may invoke the target API of the network slice corresponding tothe network slice information.

It should be noted that, in another implementation of the embodimentshown in FIG. 2 , after step 202, if the first network element is thePCF network element, when the PCF does not store the correspondencebetween the network slice information and the reference information ofthe application, the network slice information corresponding to theapplication may be further determined through the AEF network element orthe APF network element. In other words, in step 403 a and step 403 b,the AEF network element or the APF network element may be replaced withthe PCF network element. Step 404 a is replaced with the following: APCF network element sends a network slice search request message to theAEF network element or the APF network element. Step 404 b is replacedwith the following: The AEF network element or the APF network elementdetermines, based on the reference information of the application, thenetwork slice information corresponding to the application. Step 404 cis replaced with the following: The AEF network element or the APFnetwork element sends a network slice search response message to the PCFnetwork element. Step 403 c is replaced with the following: The PCFnetwork element sends a first response message to the CCF networkelement.

Optionally, in a possible implementation of the embodiment shown in FIG.4A and FIG. 4B, after steps 401 to 406, the method further includessteps 407 to 410.

After steps 401 to 406 are performed, the API invoker network elementobtains, from the CCF network element, the target API information andthe network slice information that provides the target API.Subsequently, the API invoker network element may initiate the APIinvoker process to the AEF network element. The process is shown in FIG.4A and FIG. 4B. Content of step 407 to step 410 is the same as that ofstep 306 to step 309 in FIG. 3A, FIG. 3B, FIG. 3C, and FIG. 3D. Detailsare not described herein again.

In this way, through step 407 to step 410, when the API invoker networkelement initiates the API invoker, the AEF network element can find,from the network slice, the target network element corresponding to thetarget API information, and the AEF network element obtains the APIinvoker result through the target network element, so that the APIinvoker result is fed back to the API invoker network element, therebyachieving an objective of invoking the API.

FIG. 5 is a schematic diagram of another communication method accordingto this application, and the method includes the following steps:

Step 501: An AEF network element sends reference information of anapplication to a PCF network element.

The AEF network element may send the reference information of theapplication to the PCF network element by sending a message. Forexample, a second request message sent by the AEF to the PCF networkelement includes the reference information of the application. Thesecond request message may be a slice information discovery request(Slice info discover request) message or a slice information inquiryrequest (Slice info inquiry request) message. The AEF network elementmay also send the reference information of the application to the PCFnetwork element by invoking an API. For example, there is an API betweenthe AEF network element and the PCF network element, and the AEF networkelement transfers the parameter information of the reference informationof the application to the PCF network element by invoking the API.

The reference information of the application may be at least one of anAPI invoker network element identifier, an ASP ID, an APP ID, and anAPN. For details, refer to the description in step 201. Details are notdescribed herein again.

The second request message may be a slice information discovery request(Slice info discover request) message or a slice information inquiryrequest (Slice info inquiry request) message.

Step 502: The PCF network element sends, based on the referenceinformation of the application, network slice information correspondingto the application to the AEF network element.

In an implementation, the PCF network element stores a correspondencebetween the reference information of the application and the networkslice information. The correspondence may be configured by a networkmanagement system of an operator, or when an operator subscribes to athird-party application, the operator stores subscription informationthat includes the correspondence in the PCF network element. The PCFnetwork element may locally find, based on the reference information ofthe application, the network slice information corresponding to theapplication. The network slice information, for example, a network sliceidentifier (Slice ID) such as S-NSSAI, may be used to identify a networkslice.

For example, if the PCF network element stores a correspondence betweenthe APP ID and the network slice identifier, and the second requestmessage carries the APP ID, the PCF network element may determine, basedon the correspondence, a network slice identifier corresponding to theAPP ID carried in the second request message.

Step 503: The AEF network element receives, from the PCF networkelement, the network slice information corresponding to the application.

If the AEF network element sends, to the PCF network element, the secondrequest message that includes the reference information of theapplication, the PCF network element may send, by using a message, thenetwork slice information corresponding to the application to the AEFnetwork element. For example, a second response message includes thenetwork slice information corresponding to the application. If the AEFnetwork element sends the reference information of the application tothe PCF network element by invoking the API, the PCF network element mayalso feed back, to the first network element through the API, theparameter information, namely, the network slice informationcorresponding to the application.

According to the foregoing steps, the AEF network element may obtain thenetwork slice information from the PCF network element based on thereference information of the application.

Optionally, in an implementation of the embodiment shown in FIG. 5 ,before step 501, the method further includes: The AEF network elementreceives a first invoking request message from an API invoker networkelement. The first invoking request message includes the referenceinformation of the application and target API information requested tobe invoked. After receiving the first invoking request message, the AEFnetwork element is triggered to obtain the network slice informationfrom the PCF network element.

Further, the method includes: After step 503 is performed, to bespecific, after the AEF network element obtains the network sliceinformation, the AEF network element may send a network functiondiscovery request message to an NRF network element. Because the networkfunction discovery request message includes the network sliceinformation, the NRF network element may find, based on the networkslice information and the target API information, target network elementinformation provided by the network slice, and then the AEF networkelement receives a network function discovery response message from theNRF network element. The network function discovery response messageincludes the target network element information corresponding to thenetwork slice information. It can be learned that the AEF networkelement may find the target network element information from the NRFnetwork element based on the network slice information and the targetAPI information.

Further, the method may include: After obtaining a target networkelement, the AEF network element sends a second invoking request messageto the target network element corresponding to the target networkelement information. The second invoking request message includes APIinformation, and then the target network element invokes the API, andgenerates an invoking result. Then, the AEF network element receives theinvoking result of the API from the target network element, and thenfeeds back the invoking result to the API invoker network element, so asto achieve an objective of invoking the API.

Optionally, in another implementation of the embodiment shown in FIG. 5, step 501 may be replaced with the following: When an AEF networkelement does not store network slice information corresponding toreference information of an application, the AEF network element maysend the reference information of the application to a PCF networkelement.

It should be noted that, if the AEF network element already buffers thecorrespondence between the reference information of the application andthe network slice information, the AEF network element may not send thereference information of the application to the PCF network element, butdirectly finds, based on the reference information of the application ofthe API invoker network element, the network slice information from theinformation buffered by the AEF network elementAPI invoker. Further, theAEF network element finds the target API information based on thenetwork slice information, an API inquiry parameter, and thecorrespondence between the network slice information and the APIinformation, and sends the target API information to the API invokernetwork element. It can be learned that the AEF network element directlysearches locally for the network slice information corresponding to thereference information of the application, so that the network sliceinformation can be found in a timely manner, thereby reducing acommunication interaction latency and signaling load.

The following describes an implementation process of the foregoingcommunication method with reference to FIG. 6A and FIG. 6B. Networkelements in FIG. 6A and FIG. 6B interact with each other by using amessage.

Step 601: An API invoker network element sends an API invoker requestmessage to an AEF network element.

The API invoker request message includes reference information of anapplication and target API information.

For specific content of the reference information of the application,refer to the description in step 201. Details are not described hereinagain. In this embodiment, an example in which the reference informationof the application is a WeChat application identifier and the target APIinformation is an API name is used for description.

Step 602 a: The AEF network element sends a second request message to aPCF network element.

The second request message includes the reference information of theapplication.

For example, the AEF network element sends a second request message thatincludes the WeChat application identifier to the PCF network element.

Step 602 b: The PCF network element determines, based on the referenceinformation of the application, network slice information correspondingto the application.

For example, the PCF network element determines, based on the WeChatapplication identifier, S-NSSAI corresponding to the WeChat applicationidentifier.

Step 602 c: The PCF network element sends a second response message tothe AEF network element.

The first response message includes the network slice informationcorresponding to the application.

For example, the PCF network element sends, to the AEF network element,the second response message that includes the S-NSSAI corresponding tothe WeChat application identifier.

Step 603 a: The AEF network element sends a network function discoveryrequest message to an NRF network element.

The network function discovery request message includes the target APIinformation and the network slice information corresponding to theapplication.

For example, the AEF network element sends the S-NSSAI corresponding tothe WeChat application identifier and a name of the target API to theNRF network element.

Step 603 b: The NRF network element finds target network elementinformation based on the network slice information and the target APIinformation.

For specific content of a target network element and the target networkelement information, refer to the foregoing descriptions.

Because the target network element registers API information and thenetwork slice information corresponding to the target network elementwith the NRF network element in advance, the NRF network element storesa correspondence between the target network element information and thenetwork slice information and the API information. Therefore, the NRFnetwork element can determine the target network element informationbased on the network slice information and the target API information.

For example, the NRF network element finds an SMF 1 based on the S-NSSAIcorresponding to the WeChat application identifier and the name of thetarget API.

Step 603 c: The NRF network element sends a network function discoveryresponse message to the AEF network element.

The network function discovery response message includes the targetnetwork element information.

For example, the NRF network element sends an identifier of the SMF 1 tothe AEF network element.

Step 604 a: The AEF network element sends a second invoking requestmessage to the target network element based on the target networkelement information, where the second invoking request message includesthe target API information.

Step 604 b: The target network element executes the target APIcorresponding to the target API information, and generates an invokingresult.

Step 604 c: The target network element sends the generated invokingresult to the AEF network element.

Step 605: The AEF network element sends the API invoker result to theAPI invoker network element.

For example, the invoking result is information indicating a success orinformation indicating a failure. If the invoking result is informationindicating a failure, the invoking result may further include a causevalue of the failure.

According to the foregoing communication method, the AEF network elementmay obtain the network slice information from the PCF network elementbased on the reference information of the application, and then may findthe target network element information based on the network sliceinformation. The target network element may complete API invoker andgenerate the invoking result, so that the AEF network element feeds backthe invoking result to the API invoker network element, therebyachieving an objective of invoking the API.

Optionally, in another implementation of the embodiment shown in FIG. 5, step 501 and step 502 may be replaced with the following: When an AEFnetwork element stores a correspondence between network sliceinformation and reference information of an application, the AEF networkelement directly searches the AEF network element for network sliceinformation corresponding to the application. The following describes animplementation process of the implementation with reference to FIG. 7 .

Step 701: An API invoker network element sends an API invoker requestmessage to an AEF network element.

The API invoker request message includes reference information of anapplication.

The reference information of the application may be at least one of anAPI invoker network element identifier, an ASP ID, an APP ID, and anAPN. For details, refer to the description in step 201. Details are notdescribed herein again.

Step 702: The AEF network element determines, based on the referenceinformation of the application, network slice information correspondingto the application.

The AEF network element already stores a correspondence between thereference information of the application and the network sliceinformation. The correspondence may be configured by a networkmanagement system of an operator, or when an operator subscribes to athird-party application, the operator stores subscription informationthat includes the correspondence in the AEF network element. The AEFnetwork element may locally determine, based on the referenceinformation of the application, the network slice informationcorresponding to the application. For example, the AEF network elementfinds, based on a WeChat application identifier, S-NSSAI correspondingto the WeChat application identifier.

Step 703 a: The AEF network element sends a network function discoveryrequest message to an NRF network element.

The network function discovery request message includes the networkslice information and target API information.

Step 703 b: The NRF network element finds target network elementinformation based on the network slice information and the target APIinformation.

Step 703 c: The NRF network element sends a network function discoveryresponse message to the AEF network element.

The network function discovery response message includes the targetnetwork element information.

Step 704 a: The AEF network element determines a target network elementbased on the target network element, and then sends a second invokingrequest message to the target network element, where the second invokingrequest message includes the target API information.

Step 704 b: The target network element executes the target APIcorresponding to the target API information, and generates an invokingresult.

Step 704 c: The target network element sends the generated invokingresult to the AEF network element.

Step 705: The AEF network element sends the API invoker result to theAPI invoker network element.

For example, the invoking result is information indicating a success orinformation indicating a failure. If the invoking result is informationindicating a failure, the invoking result may further include a causevalue of the failure.

According to the foregoing communication method, the AEF network elementmay directly obtain locally the network slice information based on thereference information of the application, and then may find the targetnetwork element information based on the network slice information. Thetarget network element may complete API invoker and generate theinvoking result, so that the AEF network element feeds back the invokingresult to the API invoker network element, thereby achieving anobjective of invoking the API, and reducing a communication interactionlatency and signaling load.

FIG. 8 a is a schematic diagram of another communication methodaccording to this application, and the method includes the followingsteps:

Step 801 a: An API invoker network element sends information about atarget area of an application service and network function serviceinformation corresponding to the application service to an AEF networkelement.

The API invoker network element may send, to the AEF network element bysending a message, the information about the target area of theapplication service and the network function service informationcorresponding to the application service. For example, a third requestmessage sent by the API invoker network element to the AEF networkelement includes the information about the target area of theapplication service and the network function service informationcorresponding to the application service.

In addition, the API invoker network element may also send the foregoinginformation to the AEF network element by invoking an API. For example,there is an API between the API invoker network element and the AEFnetwork element, and the API is a network function service correspondingto the application service. The API invoker network element transfersthe parameter information of the target area of the application serviceto the AEF network element by invoking the API.

The third request message may be an API invoker request message, or maybe a network service function invoking request.

The network function service (NF service) may be an API, and the networkfunction service information may be API information.

The target area of the application service (application service area) isused to indicate that the API invoker network element is an area of aservice application requested by the application service.

Assuming that the application is a V2X application, the applicationservice may be a V2X application service, and the target area of theapplication service may mean that the target area of the V2X applicationservice is Beijing. Assuming that the application is a Baiduself-driving application, the application service may be the Baiduself-driving application service, and the target area of the applicationservice may be a ribbon area of the entire Beijing information road.

The API invoker network element may be a V2X application functionentity. Step 801 may be as follows: The API invoker network element maysend the third request message to the AEF network element, where thethird request message is a broadcast transmission request message. Themessage carries a broadcast service target area and broadcast sessionfunction (Nsmf_MBS_session) information that the V2X applicationfunction entity requests to broadcast the V2X message. The broadcastsession function service information may be a message type or a messagename of the broadcast transmission request message, and is used toindicate a function of the broadcast transmission request message.

If network elements communicate with each other by invoking the API, forexample, step 801 may be understood as the following: The API invokernetwork element invokes the API (to be specific, the API invoker networkelement sends the API information to the AEF, where the API informationis broadcast session function service (Nsmf_MBS_session) information).An input parameter of the API information carries a broadcast servicetarget area for requesting to perform V2X message broadcast.

Step 802 a: The AEF network element determines a target network elementbased on the information about the target area of the applicationservice and information about a service area of a network elementcorresponding to the network function service information.

A target network element may include a network element that is in thenetwork element corresponding to the network function serviceinformation and whose service area at least partially overlaps thetarget area of the application service, or a network element that is inthe network element corresponding to the network function serviceinformation and whose service area completely overlaps the target areaof the application service. This is not limited.

Specifically, in one manner, the AEF network element determines, fromthe network element corresponding to the network function serviceinformation, a network element corresponding to a service area that atleast partially overlaps the target area of the application service, anddetermines the network element as the target network element. In anothermanner, the AEF network element determines, from the network elementcorresponding to the network function service information, a networkelement whose service area completely overlaps the target area of theapplication service, and determines the network element as the targetnetwork element.

Because one type of network function service uniquely corresponds to onetype of network element, for example, a PDU session service(Nsmf_PDUSession Service) corresponds to an SMF network element, and acommunications service (Namf_Communication service) corresponds to anAMF network element, the AEF network element may uniquely determine onetype of network element based on the network function serviceinformation, that is, a network element corresponding to the networkfunction service information.

The target network element is a network element that provides a targetAPI and that is in a network slice corresponding to the application, forexample, an SMF network element or an AMF network element. For details,refer to related descriptions in the embodiment shown in FIG. 3A, FIG.3B, FIG. 3C, and FIG. 3D.

The target network element information, for example, an IP address or aURL address of the target network element, is used to identify a targetnetwork element.

The information about the service area of the network element may begeographical location information, longitude and latitude information,administrative region information, or network area information of amobile communications network, for example, cell identifier information,tracking area (TA) identifier information, routing area (RA) identifierinformation, register area identifier information, broadcast servicearea identifier information, or roadside unit (RoadSide Unit, RSU)identifier information.

Alternatively, step 802 a is replaced with the following: The AEFnetwork element obtains information about a service area of a candidatenetwork element based on the network function service information, wherethe candidate network element is a network element corresponding to thenetwork function service information. The AEF determines the targetnetwork element based on the information about the service area of thecandidate network element and the information about the target area ofthe application service.

According to the foregoing steps, the AEF network element can accuratelydetermine the target network element based on the service area of theapplication service of the API invoker network element and theinformation about the network function service, so that the targetnetwork element invokes the API and generates an invoking result, andprovides the network function service for the API invoker networkelement.

Optionally, in another implementation of the embodiment shown in FIG. 8a , before step 802 a, the method further includes: The AEF networkelement determines, based on the network function service correspondingto the application service, network element corresponding to the networkfunction service information.

Correspondingly, step 802 a may include: The AEF network elementdetermines, from the network element corresponding to the networkfunction service information, a network element whose service area atleast partially overlaps the target area of the application service, anddetermines the network element as the target network element.

For example, the AEF network element determines, based on the networkfunction service corresponding to the application service, that networkelements that can provide the network function service are a set of SMFnetwork elements (SMF pool). Because each SMF network element has aservice area of the SMF network element, the AEF network element mayselect, from the set of SMF network elements, an SMF network elementwhose service area at least partially overlaps the target area of theapplication service, and determine the selected SMF network element asthe target network element.

For another example, the AEF network element may alternatively select,from the network element corresponding to the network function serviceinformation, an SMF network element whose service area completelyoverlaps the target area of the application service, and determine theSMF network element as the target network element.

In addition, it should be additionally noted that, if the informationlevel of the target area of the application service is inconsistent withthat of the service area of the network element (for example, the targetarea of the application service is the administrative area information,and the service area of the network element is the register areainformation), the AEF may convert the target area information of theapplication service into a form of the same level as the service areainformation of a second network element.

According to the method, the AEF network element may determine thetarget network element, to accurately provide the network functionservice for the API invoker network element.

Optionally, in another implementation of the embodiment shown in FIG. 8a , the AEF network element may obtain the network slice informationcorresponding to the application service. Then, the AEF network elementdetermines the target network element based on the network sliceinformation, the information about the service area of the networkelement corresponding to the network function service information, andthe information about the target area of the application service.

For example, the AEF network element determines, based on the networkslice information, a network slice corresponding to the network sliceinformation, then the AEF network element searches the network slice fornetwork element corresponding to the network function serviceinformation, and then determines a network element that is in thenetwork element corresponding to the network function serviceinformation and whose service area at least partially overlaps thetarget area of the application service as the target network element.

The AEF network element obtains the network slice information in aplurality of manners. For example, in one manner, the network sliceinformation is carried in the third request message, and the AEF networkelement directly obtains the network slice information from the thirdrequest information. In another manner, the AEF network element mayobtain the network slice information in the manner shown in FIG. 7 .Details are not described herein again.

Optionally, in another implementation of the embodiment shown in FIG. 8a , the AEF network element may send the information about the targetarea of the application service and the network function servicecorresponding to the application service to an NRF network element, andthen the AEF network element receives the information about the targetnetwork element from the NRF network element, as shown in FIG. 8 b.

Step 801 b: The API invoker network element sends the information aboutthe target area of the application service and the network functionservice information corresponding to the application service to the AEFnetwork element.

For details, refer to the description in step 801 a.

Step 802 b: The AEF network element sends the information about thetarget area of the application service and the network function serviceinformation corresponding to the application service to the NRF networkelement.

Step 803 b: The NRF network element determines the target networkelement based on the information about the target area of theapplication service and the information about the service area of thenetwork element corresponding to the network function serviceinformation.

Specifically, in one manner, the NRF network element determines, fromthe network element corresponding to the network function serviceinformation, a network element whose service area at least partiallyoverlaps the target area of the application service as the targetnetwork element. In another manner, the NRF network element determines,from the network element corresponding to the network function serviceinformation, a network element whose service area completely overlapsthe target area of the application service as the target networkelement.

Optionally, in step 803 b, a possible implementation is as follows: TheNRF network element may first determine, based on the network functionservice information, the network element corresponding to the networkfunction service information, and then determine a network element thatis in the network element corresponding to the network function serviceinformation and whose service area at least partially overlaps thetarget area of the application service as the target network element, ordetermine a network element that is in the network element correspondingto the network function service information and whose service areacompletely overlaps the target area of the application service as thetarget network element.

In other words, the AEF may determine the target network elementinformation through the NRF network element. Similarly, according to themethod, the NRF network element may determine the target networkelement, to accurately provide a network function service for the APIinvoker network element.

Alternatively, step 803 b is replaced with the following: The NRFnetwork element obtains information about a service area of a candidatenetwork element based on the network function service information, wherethe candidate network element is a network element corresponding to thenetwork function service information. The NRF determines the targetnetwork element based on the information about the service area of thecandidate network element and the information about the target area ofthe application service.

FIG. 8 c describes, by using an example, a process of determining anetwork element that is in the network element corresponding to thenetwork function service information and whose service area at leastpartially overlaps the target area of the application service as thetarget network function in the foregoing embodiment.

In FIG. 8 c , the information about the target area of the applicationservice provided by the API invoker network element is an area A, anetwork function service is a broadcast service, and information aboutthe network function service is API information of the broadcastservice. The AEF network element or the NRF network element locallysearches for information about a service area of a network elementcorresponding to the broadcast service. An SMF 1 network element, an SMF2 network element, and an SMF 3 network element all provide thebroadcast service, and service area corresponding to the SMF 1 networkelement, the SMF 2 network element, and the SMF 3 network element arerespectively a service area NA 1 of the SMF 1 network element, a servicearea NA 2 of the SMF 2 network element, and a service area NA 3 of theSMF 3 network element. Because service area of the SMF 1 networkelement, the SMF 2 network element, and the SMF 3 network element alloverlap the area A, the AEF network element or the NRF network elementdetermines the SMF 1 network element, the SMF 2 network element, and theSMF 3 network element as target network elements.

It should be noted that related reference may be made between theembodiments of this application, for example, nouns and steps. This isnot limited.

Based on a same inventive concept, FIG. 9 is a schematic diagram of anapparatus according to this application. The apparatus 900 includes atleast one processor 91, and the at least one processor is coupled to atleast one memory.

Optionally, the apparatus further includes a transceiver 92.

Optionally, the apparatus further includes a memory 93, and the memory93 is coupled to at least one processor 91.

Further, the processor 91, the transceiver 92, and the memory 93 may beconnected by using a communications bus 94.

The memory 93 is configured to store application program code forperforming the solutions of the present invention, and execution of thesolutions is controlled by the processor 91.

The processor 91 is configured to execute a function or an action of thenetwork element in the foregoing method embodiment, for example, invokethe application program code in the memory 93, so as to implementfunctions of the foregoing network elements. Details are as follows.

In a first application scenario, the apparatus 900 may be a CCF networkelement, or may be a system on chip or a chip on a CCF network element.The processor 91 may perform the method performed by the CCF networkelement in any one of the foregoing embodiments. For related features,refer to the foregoing descriptions. Details are not described hereinagain.

In a second application scenario, the apparatus 900 may be an AEFnetwork element, or may be a system on chip or a chip on an AEF networkelement. The processor 91 may perform the method performed by the AEFnetwork element in any one of the foregoing embodiments. For relatedfeatures, refer to the foregoing descriptions. Details are not describedherein again.

In a third application scenario, the apparatus 900 may be a firstnetwork element, or may be a system on chip or a chip on a first networkelement. The first network element may be an AEF network element, a PCFnetwork element, or an APF network element. The processor 91 may performthe method performed by the first network element in any one of theforegoing embodiments. For related features, refer to the foregoingdescriptions. Details are not described herein again.

In a fourth application scenario, the apparatus 900 may be an APIinvoker network element, or may be a system on chip or a chip on an APIinvoker network element. The processor 91 may perform the methodperformed by the API invoker network element in any one of the foregoingembodiments. For related features, refer to the foregoing descriptions.Details are not described herein again.

In a fifth application scenario, the apparatus 900 may be an NRF networkelement, or may be a system on chip or a chip on an NRF network element.The processor 91 may perform the method performed by the NRF networkelement in any one of the foregoing embodiments. For related features,refer to the foregoing descriptions. Details are not described hereinagain.

The processor 91 may be a general-purpose central processing unit (CPU),a microprocessor, an ASIC, or one or more integrated circuits configuredto control program execution in the solutions of the present invention.

The communications bus 94 may include a path for transferringinformation between the foregoing units.

The transceiver 92 is configured to communicate with another device or acommunications network. The transceiver 92 may be a communicationsinterface, for example, a wired interface, a wireless interface, or aWi-Fi interface, or the transceiver includes a radio frequency circuit.

The memory 93 may be a ROM or another type of static storage device thatcan store static information and an instruction, or a RAM or anothertype of dynamic storage device that can store information and aninstruction, or may be an electrically erasable programmable read-onlymemory (EEPROM), a compact disc read-only memory (CD-ROM) or anotheroptical disc storage, an optical disc storage (including a compactoptical disc, a laser disc, an optical disc, a digital versatile opticaldisc, a blue optical disc, and the like), a magnetic disk storage mediumor another magnetic storage device, or any other medium that can carryor store expected program code in an instruction or data structure formand can be accessed by a computer. However, this is not limited herein.The memory 93 may exist independently, or may be connected to theprocessor 91 by using the communications bus. The memory 93 mayalternatively be integrated with the processor.

During specific implementation, in an embodiment, the processor 91 mayinclude one or more CPUs, such as a CPU 0 and a CPU 1 in FIG. 9 .

During specific implementation, in an embodiment, the apparatus 900 mayinclude a plurality of processors, for example, the processor 91 and aprocessor 98 in FIG. 9 . Each of the processors may be a single-core(single-CPU) processor, or may be a multi-core (multi-CPU) processor.The processors herein may be one or more devices, circuits, and/orprocessing cores for processing data (for example, a computer programinstruction).

In this application, function modules in the apparatus may be obtainedthrough division based on the foregoing method examples. For example,the function modules may be obtained through division based oncorresponding functions, or two or more functions may be integrated intoone processing module. The foregoing integrated module may beimplemented in a form of hardware, or may be implemented in a form of asoftware function module. It should be noted that, in this application,module division is an example, and is merely logical function division.In actual implementation, another division manner may be used. Forexample, the function modules is obtained through division based oncorresponding functions.

FIG. 10 is a schematic diagram of an apparatus.

In an application, the apparatus may be the CCF network element in theforegoing embodiments or a system on chip or a chip on the CCF networkelement. The apparatus includes a sending unit 1001 and a receiving unit1002.

The sending unit 1001 is configured to send reference information of anapplication to a first network element.

The receiving unit 1002 is configured to receive, from the first networkelement, network slice information corresponding to the application.

The first network element is an AEF network element, an APF networkelement, or a PCF network element. The reference information of theapplication includes at least one of an API invoker network elementidentifier, an ASP identifier, an application identifier, and an APN.

In a possible implementation, the receiving unit 1002 is furtherconfigured to receive an application programming interface API publishrequest message from an API publishing network element, where the APIpublish request message includes a correspondence between the networkslice information and API information.

In a possible implementation, the receiving unit 1002 is furtherconfigured to:

before sending the reference information of the application to the firstnetwork element, receive an API discover request message from an APIinvoker network element, where the API discover request message includesan API inquiry parameter and the reference information that is of theapplication. The API inquiry parameter includes at least one of an APItype, a transfer protocol type, and interface information.

The apparatus further includes a processing unit 1003, configured to:after receiving, from the first network element, the network sliceinformation corresponding to the application, determine target APIinformation based on the correspondence between the network sliceinformation and the API information, the network slice information, andthe API inquiry parameter.

In a possible implementation, the sending unit 1001 is furtherconfigured to send the network slice information and the target APIinformation to the API invoker network element.

In a possible implementation, the sending unit 1001 is furtherconfigured to: when the sending unit 1001 does not store the networkslice information corresponding to the reference information of theapplication, send the reference information of the application to thefirst network element.

It should be understood that the apparatus may be configured toimplement the steps performed by the CCF network element in theforegoing method embodiments. For related features, refer to theforegoing descriptions. Details are not described herein again.

FIG. 11 shows another apparatus.

In an application, the apparatus may further be an AEF network elementor a system on chip or a chip on an AEF network element. The apparatusmay be configured to perform actions of the AEF network element in theforegoing method embodiments.

A communications unit 1102 is configured to send reference informationof an application to a PCF network element.

A processing unit 1101 is configured to receive, from the PCF networkelement, network slice information corresponding to the application.

In a possible implementation, the processing unit 1101 is furtherconfigured to:

before sending the reference information of the application to the PCFnetwork element, receive a first invoking request message from an APIinvoker network element, where the first invoking request messageincludes the reference information of the application and target APIinformation requested to be invoked;

after receiving, from the PCF network element, the network sliceinformation corresponding to the application, send a network functiondiscovery request message to a network function repository function NRFnetwork element, where the network function discovery request messageincludes the network slice information and the target API information;and

receive a network function discovery response message from the NRFnetwork element, where the network function discovery response messageincludes target network element information corresponding to the networkslice information and the target API.

In a possible implementation, the processing unit 1101 is furtherconfigured to:

after receiving the network function discovery response message from theNRF network element, send, based on the first invoking request message,a second invoking request message to a target network elementcorresponding to the target network element information, where thesecond invoking request message includes the API information;

receive an invoking result of the API from the target network element;and

send the invoking result to the API invoker network element.

In a possible implementation, the processing unit 1101 is specificallyconfigured to:

when the processing unit 1101 does not store the network sliceinformation corresponding to the reference information of theapplication, send the reference information of the application to thePCF network element.

It should be understood that the apparatus may be configured toimplement steps performed by the AEF network element in thecommunication method in the foregoing embodiments of the presentinvention. For related features, refer to the foregoing descriptions.Details are not described herein again.

In another application, the apparatus shown in FIG. 10 may alternativelybe a first network element or a system on chip or a chip on a firstnetwork element. The first network element may be an AEF networkelement, a PCF network element, or an APF network element. The apparatusmay be configured to perform actions of the first network element in theforegoing method embodiments.

The receiving unit 1002 is configured to receive reference informationof an application from a common application programming interfaceframework core function CCF network element.

The sending unit 1001 is configured to send, based on the referenceinformation of the application, network slice information correspondingto the application to the CCF network element.

It should be understood that the apparatus may be configured toimplement steps performed by the first network element in thecommunication method in the foregoing embodiments of the presentinvention. For related features, refer to the foregoing descriptions.Details are not described herein again.

In another application, the apparatus shown in FIG. 11 may further be anAEF network element or a system on chip or a chip on an AEF networkelement. For example, the apparatus may be configured to perform actionsof the AEF network element in the embodiment in FIG. 8 a or FIG. 8 b.

The communications unit 1102 is configured to receive, from an APIinvoker network element, information about a target area of anapplication service and network function service informationcorresponding to the application service.

The processing unit 1101 is configured to determine a target networkelement based on the information about the target area of theapplication service and information about a service area of a networkelement corresponding to the network function service information.

The target network element is configured to provide, for the API invokernetwork element, a network function service corresponding to the networkfunction service information.

The target network element may include a network element that is in thenetwork element corresponding to the network function serviceinformation and whose service area at least partially overlaps thetarget area of the application service, or a network element that is inthe network element corresponding to the network function serviceinformation and whose service area completely overlaps the target areaof the application service. This is not limited.

In a possible implementation, the processing unit 1101 is furtherconfigured to determine, from the network element corresponding to thenetwork function service information, a network element whose servicearea at least partially overlaps the target area of the applicationservice as the target network element.

In a possible implementation, the processing unit 1101 is furtherconfigured to: obtain the network slice information, and then determinethe target network element based on the network slice information, theinformation about the service area of the network element correspondingto the network function service information, and the information aboutthe target area of the application service.

It should be understood that the apparatus may be configured toimplement steps performed by the AEF network element in thecommunication method in the foregoing embodiments of the presentinvention. For related features, refer to the foregoing descriptions.Details are not described herein again.

In another application, the apparatus shown in FIG. 11 may further be anNRF network element or a system on chip or a chip on an NRF networkelement. For example, the apparatus may be configured to perform actionsof the NRF network element in the embodiment shown in FIG. 8 b.

The communications unit 1102 is configured to receive, from an AEFnetwork element, information about a target area of an applicationservice and network function service information corresponding to theapplication service.

The processing unit 1101 is configured to determine a target networkelement based on the information about the target area of theapplication service and the information about a service area of anetwork element corresponding to the network function serviceinformation.

For the foregoing nouns or actions, refer to related descriptions in theembodiment shown in FIG. 8 b . Details are not described again.

In this embodiment, the apparatus is presented in a form in whichfunction modules are obtained through division based on correspondingfunctions, or the service control entity is presented in a form in whichfunction modules are obtained through division in an integrated manner.The “module” herein may be an ASIC, a circuit, a processor and a memorythat execute one or more software programs or firmware programs, anintegrated logic circuit, and/or another component that can provide theforegoing functions.

All or some of the foregoing embodiments may be implemented throughsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, the embodiments may be implementedcompletely or partially in a form of a computer program product. Thecomputer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on acomputer, the procedure or functions according to the embodiments of thepresent invention are all or partially generated. The computer may be ageneral-purpose computer, a dedicated computer, a computer network, oranother programmable apparatus. The computer instructions may be storedin a computer-readable storage medium or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line (DSL)) or wireless (forexample, infrared, radio, and microwave, or the like) manner. Thecomputer-readable storage medium may be any usable medium accessible bya computer, or a data storage device, such as a server or a data center,integrating one or more usable media. The usable medium may be amagnetic medium (for example, a soft disk, a hard disk, or a magnetictape), an optical medium (for example, DVD), a semiconductor medium (forexample, a solid-state drive (Solid State Disk, SSD)), or the like.

Although the present invention is described with reference to theembodiments, in a process of implementing the present invention thatclaims protection, a person skilled in the art may understand andimplement another variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.In the claims, “comprising” does not exclude another component oranother step, and “a” or “one” does not exclude a case of multiple. Asingle processor or another unit may implement several functionsenumerated in the claims. Some measures are recorded in dependent claimsthat are different from each other, but this does not mean that thesemeasures cannot be combined to produce a better effect.

A person skilled in the art should understand that the embodiments ofthis application may be provided as a method, an apparatus (device), acomputer-readable storage medium, or a computer program product.Therefore, this application may use a form of a hardware-onlyembodiment, a software-only embodiment, or an embodiment with acombination of software and hardware, which are collectively referred toas “modules” or “systems” herein.

This application is described with reference to the flowcharts and/orblock diagrams of the method, the apparatus (device), and the computerprogram product this application. It should be understood that computerprogram instructions may be used to implement each procedure and/or eachblock in the flowcharts and/or the block diagrams and a combination of aprocedure and/or a block in the flowcharts and/or the block diagrams.These computer program instructions may be provided for ageneral-purpose computer, a dedicated computer, an embedded processor,or a processor of another programmable data processing device togenerate a machine, so that the instructions executed by the computer orthe processor of the another programmable data processing devicegenerate an apparatus for implementing a specific function in one ormore processes in the flowcharts and/or in one or more blocks in theblock diagrams.

These computer program instructions may alternatively be stored in acomputer-readable memory that can instruct a computer or anotherprogrammable data processing device to work in a specific manner, sothat the instructions stored in the computer-readable memory generate anartifact that includes an instruction apparatus. The instructionapparatus implements a specific function in one or more procedures inthe flowcharts and/or in one or more blocks in the block diagrams.

The computer program instructions may alternatively be loaded onto acomputer or another programmable data processing device, so that aseries of operations and steps are performed on the computer or theanother programmable device, to generate computer-implementedprocessing. Therefore, the instructions executed on the computer or theanother programmable device provide steps for implementing a specificfunction in one or more procedures in the flowcharts and/or in one ormore blocks in the block diagrams.

What is claimed is:
 1. A communication method applied to a communicationsystem including a common application programming interface frameworkcore function (CCF) network element and a first network element, themethod comprising: sending, by the CCF network element, referenceinformation of an application to the first network element; receiving,by the first network element, the reference information of theapplication; sending, by the first network element, network sliceinformation corresponding to the application based on the referenceinformation of the application; receiving, by the CCF network elementfrom the first network element, the network slice informationcorresponding to the application; and receiving, by the CCF networkelement, an application programming interface (API) discover requestmessage from an API invoker network element, wherein the API discoverrequest message comprises an API inquiry parameter and the referenceinformation of the application.
 2. The method according to claim 1,further comprising: receiving, by the CCF network element, an APIpublish request message from an API publishing network element, whereinthe API publish request message comprises a correspondence between thenetwork slice information and API information.
 3. The method accordingto claim 2, wherein before sending the reference information of theapplication to the first network element, the method further comprises:wherein after receiving the network slice information corresponding tothe application, the method further comprises: determining, by the CCFnetwork element based on the correspondence between the network sliceinformation and the API information, the network slice information, andthe API inquiry parameter, target API information corresponding to theapplication, wherein an API corresponding to the target API informationis invoked by the API invoker network element.
 4. The method accordingto claim 3, further comprising: sending, by the CCF network element, thenetwork slice information and the target API information to the APIinvoker network element.
 5. The method according to claim 1, wherein thesending the reference information of the application to the firstnetwork element comprises: in response to the CCF network element notstoring the network slice information corresponding to the referenceinformation of the application, sending, by the CCF network element, thereference information of the application to the first network element.6. The method according to claim 3, wherein the API inquiry parametercomprises at least one of an API type, a transfer protocol type, andinterface information.
 7. The method according to claim 1, wherein thereference information of the application comprises at least one of anAPI invoker network element identifier, an application service provider(ASP) identifier, an application identifier, and an access point name(APN).
 8. A communications system comprising a common applicationprogramming interface framework core function (CCF) network element anda first network element, wherein the CCF network element is configuredto send reference information of an application to the first networkelement; the first network element is configured to receive thereference information of the application, and send network sliceinformation corresponding to the application to the CCF network elementbased on the reference information of the application; the CCF networkelement is further configured to receive, from the first networkelement, the network slice information corresponding to the application;and before the CCF network element sends the reference information ofthe application to the first network element, the CCF network element isfurther configured to: receive an application programming interface(API) discover request message from an API invoker network element,wherein the API discover request message comprises an API inquiryparameter and the reference information of the application.
 9. Thesystem according to claim 8, wherein the CCF network element isconfigured to receive an API publish request message from an APIpublishing network element, wherein the API publish request messagecomprises a correspondence between the network slice information and APIinformation.
 10. The system according to claim 9, wherein: after the CCFnetwork element receives, from the first network element, the networkslice information corresponding to the application, the CCF networkelement is further configured to: determine, based on the correspondencebetween the network slice information and the API information, thenetwork slice information, and the API inquiry parameter, target APIinformation corresponding to the application, wherein an APIcorresponding to the target API information is invoked by the APIinvoker network element.
 11. The system according to claim 10, whereinthe CCF network element is further configured to send the network sliceinformation and the target API information to the API invoker networkelement.
 12. The system according to claim 8, wherein the CCF networkelement is configured to: in response to the CCF network element notstoring the network slice information corresponding to the referenceinformation of the application, send the reference information of theapplication to the first network element.
 13. The system according toclaim 11, wherein the API inquiry parameter comprises at least one of anAPI type, a transfer protocol type, and interface information.
 14. Thesystem according to claim 8, wherein the reference information of theapplication comprises at least one of an API invoker network elementidentifier, an application service provider (ASP) identifier, anapplication identifier, and an access point name (APN).
 15. The systemaccording to claim 8, wherein the first network element is anapplication programming interface exposure function (AEF) networkelement, an application programming interface publishing function (APF)network element, or a policy control function (PCF) network element. 16.A communications system, comprising: an application programminginterface exposure function (AEF) network element and a policy controlfunction (PCF) network element, wherein the AEF network element isconfigured to send reference information of an application to the PCFnetwork element; the PCF network element is configured to send, based onthe received reference information of the application, network sliceinformation corresponding to the application to the AEF network element;and the AEF network element is further configured to receive, from thePCF network element, the network slice information corresponding to theapplication; before the AEF network element sends the referenceinformation of the application to the PCF network element, the AEFnetwork element is further configured to: receive a first invokingrequest message from an application programming interface (API) invokernetwork element, wherein the first invoking request message comprisesthe reference information of the application and target API informationrequested to be invoked; and after the AEF network element receives,from the PCF network element, the network slice informationcorresponding to the application, the AEF network element is furtherconfigured to: send a network function discovery request message to anetwork repository function a (NRF) network element, wherein the networkfunction discovery request message comprises the network sliceinformation and the target API information.
 17. The system according toclaim 16, wherein: after the AEF network element receives, from the PCFnetwork element, the network slice information corresponding to theapplication, the AEF network element is further configured to: receive anetwork function discovery response message from the NRF networkelement, wherein the network function discovery response messagecomprises target network element information corresponding to thenetwork slice information and a target API.
 18. The system according toclaim 17, wherein after the AEF network element receives, from the NRFnetwork element, the network slice information corresponding to theapplication, the AEF network element is further configured to: send,based on the first invoking request message, a second invoking requestmessage to a target network element corresponding to the target networkelement information, wherein the second invoking request messagecomprises the target API information; receive an invoking result of thetarget API from the target network element; and send the invoking resultto the API invoker network element.
 19. The system according to claim16, wherein the AEF network element is configured to: in response to theAEF network element not storing the network slice informationcorresponding to the reference information of the application, send thereference information of the application to the PCF network element. 20.The system according to claim 16, wherein the reference information ofthe application comprises at least one of an API invoker network elementidentifier, an application service provider (ASP) identifier, anapplication identifier, and an access point name (APN).